﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="CSI.Directory.Core.Model"%>
<%if (ViewData["User"] != null){%>
        
        <%=((User)ViewData["User"]).Name%>
        <a style="margin-left:10px;font-size:9pt;" href="/login/out" >Logout</a>
        <%if (((User)ViewData["User"]).IsListed && ((User)ViewData["User"]).Package != 0)
          {%>
            <a class="listing-button" href="/Directory/ManageListing/<%=((User)ViewData["User"]).Id %>">Manage Listing</a>
        <%} else if (((User)ViewData["User"]).IsListed && ((User)ViewData["User"]).Package == 0){%>
          <a class="listing-button" href="/Register/Package" style="color:#fff">Upgrade your account</a>
          
        <%}else if(!((User)ViewData["User"]).SetUpComplete){ %>
           <a class="listing-button" href="/Register/Package" style="color:#fff">Add Listing</a>
        <%}else if (((User)ViewData["User"]).Package == 0)
          { %>
            <a class="listing-button" href="/Directory/FreeListing" style="color:#fff">Add Listing</a>
        <%}else { %>
            <a class="listing-button" href="/Directory/NewListing" style="color:#fff">Add Listing</a>
        <%} %>
<%}else{ %>
   	       	
   	      <a href="/Login">Login</a>  or <a href="/Register">Sign Up</a>
<%} %>

